<?php namespace Summer\Box\Updates;

use Schema;
use Winter\Storm\Database\Updates\Migration;

class BuilderTableCreateSummerBoxItems extends Migration
{
    public function up()
    {
        Schema::create('summer_box_items', function($table)
        {
            $table->engine = 'InnoDB';
            $table->increments('id')->unsigned();
            $table->timestamp('created_at')->nullable();
            $table->timestamp('updated_at')->nullable();
            $table->string('title');
            $table->string('cover', 500)->nullable();
            $table->integer('type');
            $table->decimal('price', 14, 2);
            $table->integer('user_id');
            $table->integer('from')->nullable()->default(1);
            $table->integer('sale')->nullable()->default(0);
            $table->integer('status')->nullable()->default(1);
            $table->string('status_slug')->nullable();
            $table->integer('is_shangjia')->nullable()->default(0);
            $table->integer('pid')->nullable()->default(0);
        });
    }
    
    public function down()
    {
        Schema::dropIfExists('summer_box_items');
    }
}
